#ifndef MAKEBOTTLE_H
#define MAKEBOTTLE_H
/* ====================================================
#   Copyright (C)2019 Li Jianbin All rights reserved.
#
#   Author        : Li Jianbin
#   Email         : lijianbinmail@163.com
#   File Name     : makebottle.h
#   Last Modified : 2019-05-12 2:00
#   Describe      : Bottle model sample
#
# ====================================================*/
#include <QTextStream>
#include "src/pub/publics.h"

#include <Geom_TrimmedCurve.hxx>
#include <GC_MakeArcOfCircle.hxx>
#include <GC_MakeSegment.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <TopoDS_Wire.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
#include <BRepBuilderAPI_Transform.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
#include <TopoDS.hxx>
#include <BRepPrimAPI_MakePrism.hxx>
#include <BRepFilletAPI_MakeFillet.hxx>
#include <TopExp_Explorer.hxx>
#include <BRepPrimAPI_MakeCylinder.hxx>
#include <BRepAlgoAPI_Fuse.hxx>
#include <Geom_Plane.hxx>
#include <TopoDS_Edge.hxx>
#include <BRepOffsetAPI_MakeThickSolid.hxx>
#include <Geom_CylindricalSurface.hxx>
#include <Geom2d_Ellipse.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <GCE2d_MakeSegment.hxx>
#include <BRepLib.hxx>
#include <BRepOffsetAPI_ThruSections.hxx>
#include <BRepPrimAPI_MakeSphere.hxx>
#include <BRepPrimAPI_MakeCone.hxx>
#include <BRepPrimAPI_MakeTorus.hxx>
#include <BRepBuilderAPI_Transform.hxx>
#include <BRepPrimAPI_MakeBox.hxx>
#include <BRepBuilderAPI_MakeVertex.hxx>
#include <BRepBuilderAPI_MakePolygon.hxx>
#include <AIS_Shape.hxx>



//! 由两个点绘制一条线
TopoDS_Shape make_Line(gp_Pnt a1, gp_Pnt a2)
{
    gp_Vec f(a2.X() - a1.X(), a2.Y() - a1.Y(), a2.Z() - a1.Z());
    TopoDS_Vertex aVertex = BRepBuilderAPI_MakeVertex(a1);
    return BRepPrimAPI_MakePrism(aVertex,f);
}


//! 由一组点绘制一个多边形
TopoDS_Shape make_PolygonPath(std::vector<Pos3dzx> f)
{
    BRepBuilderAPI_MakePolygon PO;
    for(auto p:f){
        PO.Add(gp_Pnt (p.x, p.y, p.z));
    }
    TopoDS_Wire W1 = PO.Wire();
    return  TopoDS::Wire(W1);
}



#endif // MAKEBOTTLE_H
